
#include "gtest/gtest.h"

#include "IndirectList.h"

TEST( IndirectListTest, Simple )
{
    int x;
    IndirectList<int> L(5);

    EXPECT_EQ( 0, L.Length() );
    EXPECT_TRUE( L.IsEmpty() );

    L.Insert( 0, 2 ).Insert( 1, 6 );
    EXPECT_FALSE( L.IsEmpty() );
    EXPECT_EQ( 2, L.Length() );

    L.Find( 1, x );
    EXPECT_EQ( 2 ,x );

    L.Delete( 1, x );
    EXPECT_EQ( 2 ,x );

}

#include "main_stub.h"

